package com.yao.yaoojbackendserviceclient.service;

import com.yao.yaoojbackendmodel.model.entity.Question;
import com.yao.yaoojbackendmodel.model.entity.QuestionSubmit;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
* @author Lecoo
* @description 针对表【question(题目)】的数据库操作Service
* @createDate 2025-04-20 15:54:52
*/
@FeignClient(name = "yaooj-backend-question-service", path = "/api/question/inner") //和yml里面的spring name对应
public interface QuestionFeignClient {
    //IService<Question> 继承了通用的代码（各种增删改查），比如批量插入

    //questionService.getById(questionId)
    //questionSubmitService.getById(questionSubmitId)
    //questionSubmitService.updateById(questionSubmitUpdate)

    @GetMapping("/get/id")
    Question getQuestionById (@RequestParam("questionId") long questionId);

    @GetMapping("/question_submit/get/id")
    QuestionSubmit getquestionSubmitById(@RequestParam("questionSubmitId") long questionSubmitId);

    @PostMapping("/question_submit/update")
    Boolean updateQuestionSubmitById(@RequestBody QuestionSubmit questionSubmit);
}
